Fix: segfault switching between read/write windows #1718
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pop()
ing it from the queue. This is needed as theread_write
queue is used to post the lambda that switches to the read window. The read window can then start and begin pushing future tasks to theread_write
queue. This allows multiple threads to access theread_write
at one time as the original call to switch to the read window is running unlocked, once it finishes it pops from the queue while other threads can access it.read_only_trx_test.py
so it can run in non-debug mode. In debug mode it generates an excessive amount of logging slowing down the test. Running in non-debug allowed the test to more easily trigger the segfault. Also enhanced the test to provide better error output if it does fail.This fix needs to be back-ported to 4.0.
Resolves #1716